package com.dao.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Component;

import com.bean.HeadTag;
import com.dao.HeadTagDao;

@Component("headTagDao")
public class HeadTagDaoImpl implements HeadTagDao{

	@Autowired
	private MongoTemplate mongoTemplate;

	@Override
	public List<HeadTag> selectList() {
		List<HeadTag> data=mongoTemplate.find(new Query(),HeadTag.class);
		return data;
	}

	@Override
	public long selectListByCount() {
		long count=mongoTemplate.count(null, HeadTag.class);
		return count;
	}
	
	
}
